package com.fc.mall.portal.controller;

import com.fc.mall.base.object.Result;
import com.fc.mall.portal.service.SmsBargainPromotionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by sunny on 2019/10/11.
 */
@RestController
@RequestMapping("/bargain/promotion")
public class SmsBargainPromotionController {

    @Autowired
    private SmsBargainPromotionService bargainPromotionService;
    @GetMapping("{promotionId}/list")
    public Result handleGetBargainProductByPromotion(@PathVariable("promotionId") Long promotionId)
    {
        return Result.success(bargainPromotionService.getBargainProductListByPromotion(promotionId));
    }
}
